Write-Host "Copying nsis-resources to electron-builder cache..." -ForegroundColor Green

# Create electron-builder cache directory
$electronBuilderCache = "$env:USERPROFILE\.cache\electron-builder"
$localCache = "cache"

if (!(Test-Path $electronBuilderCache)) {
    New-Item -ItemType Directory -Path $electronBuilderCache
}

# Copy nsis-resources to electron-builder cache
if (Test-Path "$localCache\nsis-resources") {
    Write-Host "Copying nsis-resources to electron-builder cache..." -ForegroundColor Yellow
    Copy-Item -Path "$localCache\nsis-resources" -Destination $electronBuilderCache -Recurse -Force
    Write-Host "nsis-resources copied to: $electronBuilderCache\nsis-resources" -ForegroundColor Green
} else {
    Write-Host "Error: nsis-resources not found in $localCache\nsis-resources" -ForegroundColor Red
}

Write-Host "Copy completed!" -ForegroundColor Green
Read-Host "Press any key to continue..." 